Skip to content

feat: unquoted escaping added#72

Open
sirkon wants to merge 6 commits intonapi-rs:mainfrom
sirkon:main
Open

feat: unquoted escaping added#72
sirkon wants to merge 6 commits intonapi-rs:mainfrom
sirkon:main

Conversation

@sirkon
Copy link
Copy Markdown

@sirkon sirkon commented Apr 19, 2026

I have a case where I construct keys with concatenation. Need to concatenate in a standalone buffer with the current API, meaning excessive copying. The proposed "unquoted" API solves this issue.

  • I moved actual formatting logic from format_string to format_raw
  • I decided to put #[inline(always)] on format_string and format_unquoted. My first intention was to keep public inline semantics and put that #[inline(always)] on format_raw functions, but there're issues with inlining and target_feature. Anyway, both format_string and format_unquoted are tiny now, so this should not change much compared to what it have been.

@sirkon sirkon force-pushed the main branch 6 times, most recently from 551e7ad to 2415e23 Compare April 19, 2026 10:07
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 20, 2026

Merging this PR will not alter performance

✅ 3 untouched benchmarks


Comparing sirkon:main (4ce101b) with main (6f12669)

Open in CodSpeed

sirkon added 2 commits April 20, 2026 08:13
- format_raw is unsafe everywhere
- dropped unused variables from format_unquoted everywhere
- fixed "misspell" when avx/sse/neon stuff could call v128's format_raw
- checked every hardware I could (except avx512 I have no access too)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant